import request from '@/utils/request'

// export function getList(params) {
//   return request({
//     url: '/table/list',
//     method: 'get',
//     params
//   })
// }
export default {
    getHospSetList(current,limit,searchObj) { 
        return request({
            // 使用``模板字符串可以通过表达式取值
            url: `/admin/hosp/hospitalSet/findPageHospSet/${current}/${limit}`,
            method: 'post',
            // 使用data方式传参json形式
            data:searchObj
        })
    },
    deletehosp(id) { 
        return request({
            url: `/admin/hosp/hospitalSet/idremove/${id}`,
            method: 'delete'
        
        })
    },
    batchhospSet(idArrayList){
        return request({
            url: `/admin/hosp/hospitalSet/batcRemove`,
            method: 'delete',
            // 后端是json传输
            data:idArrayList
        })
    },
    lockHospital(id, status) { 
        return request({
            url: `/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
            method:'post'
        })
    },
    savehospSet(saveHospitalSet){ 
        return request({
            url: '/admin/hosp/hospitalSet/saveHospitalSet',
            method: 'post',
            data:saveHospitalSet
        })   
    },
    //通过id获取信息
    getidhosp(id) { 
        return request({
            url: `/admin/hosp/hospitalSet/getHospSet/${id}`,
            method: 'get',
        })
            
    },
    //根据id查询得信息修改
    updateHospSet(updateHospitalSet) { 
        return request({
            url: `/admin/hosp/hospitalSet/updateHospitalSet`,
            method: 'post',
            data:updateHospitalSet
        })
    }
    }

